package com.yurui.proxy.cglib;


import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class TargetMethodInterceptor implements MethodInterceptor {
    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        System.out.println(">>>>MethodInterceptor start...");
        Object result = methodProxy.invokeSuper(o,objects);
        System.out.println(">>>>MethodInterceptor ending...");
        return "result";
    }

}
